package com.thinkcube.edutainment.service.viewitem;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.thinkcube.edutainment.R;
import com.thinkcube.edutainment.domain.data.GlossaryData;

/**
 * Shanuka @Cyberlmj 3:08:30 PM Email: shanuka.gayashan@cyberlmj.com
 */
@EViewGroup(R.layout.glossary_item)
public class GlossaryItem extends RelativeLayout {

	@ViewById(R.id.glossary_title)
	TextView glossaryTitle;
	
	@ViewById(R.id.glossary_description)
	TextView glossaryDescription;


	public GlossaryItem(final Context context) {
		super(context);

	}

	public GlossaryItem(final Context context, final AttributeSet attrs) {
		super(context, attrs);
	}

	public void bind(final GlossaryData glossaryData) {
		
		glossaryTitle.setText(glossaryData.getTerm());
		
		glossaryDescription.setText(glossaryData.getDescription());
		
       System.out.println("GLOSSARY "+glossaryData.getTerm());
	}
}
